package com.mercycrazy.springframework.core.convert.support;

import com.mercycrazy.springframework.core.convert.converter.ConverterRegistry;

/**
 * A specialization of {@link GenericConversionService} configured by default with converters appropriate for most environments.
 *
 * @author <a href="mailto:1443424326@qq.com">mercycrazy</a>
 * @since 2022-12-04
 */
public class DefaultConversionService extends GenericConversionService {

    public DefaultConversionService() {
        addDefaultConverters(this);
    }

    public static void addDefaultConverters(ConverterRegistry converterRegistry) {
        converterRegistry.addConverterFactory(new StringToNumberConverterFactory());
    }
}
